package str;

/**
 * @ Author     ：侯耀祖
 * @ Description：
 */
public class leftStr {
    public String leftStr(int k, String s){
        int num = k;
        StringBuilder sb = new StringBuilder();
        for (int i = s.length()-1; k > 0; i--){
            sb.append(s.charAt(i));
            k--;
        }
        sb.reverse();
        for (int i = 0; i < s.length()-num; i++){
            sb.append(s.charAt(i));
        }
        return sb.toString();
    }
}
